﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Services;


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [WebMethod]
    public static string IsUserNameExist(string userName)
    {


        if (userName.Trim() != "jiayizhen" && userName != "")//此处应用数据库验证
        {
            return "ok";
        }
        else
        {
            return userName + "已被使用";
        }
    }
    [WebMethod]
    public static string CheckPassword(string pwd)
    {
        if (pwd.Trim().Length > 16)
            return "密码太长了";
        else if (pwd.Trim().Length < 6)
            return "密码太短了";
        else
            return "ok";
    }

    [WebMethod]
    public static string CheckPasswordSame(string pwd1, string pwd2)
    {
        if (pwd1.Trim() == pwd2.Trim())
            return "ok";
        else
            return "密码输入不一致";
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        
    }
}
